add connProcess to P2PConnection
authorJoey Hess <joeyh@joeyh.name>
Wed, 30 Jul 2025 16:25:59 +0000 (12:25 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 30 Jul 2025 16:35:16 +0000 (12:35 -0400)
commita6f824846513a5fefec6c12542b78b14c2953c1c
tree6708a6dbfe1e2b23d1fbdba7e798f33fd80046ac
parentf631bc9e567447c7c0f3c0d0bb5f77f8bdd66303
add connProcess to P2PConnection

When using the new generic P2P transport to open an outgoing connection
to a peer, this will hold the pid of the git-annex-p2p-<netname>
command.

closeConnection simply waits for it. Rather than relying on garbage
collection of the closed handles to close it.

In Remote.Helper.Ssh, connProcess is set to Nothing, even though there
is a similar process being used there. That code stores the pid in
OpenConnection instead, and handles waiting for it itself. A bit ugly,
but not worth cleaning up at this point, maybe later.
Annex/Proxy.hs
Command/EnableTor.hs
P2P/Http/State.hs
P2P/IO.hs
Remote/Helper/Ssh.hs
RemoteDaemon/Transport/Tor.hs